//
//  LinhaListaProjectos.m
//  nova
//
//  Created by user on 11/08/03.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "LinhaListaProjectos.h"


@implementation LinhaListaProjectos

@synthesize projectIcon;
@synthesize projectNameLabel;
@synthesize projectName;
@synthesize riskIcon;
@synthesize problemIcon;
@synthesize actionIcon;
@synthesize resourceIcon;

@synthesize risksLabel;
@synthesize problemLabel;
@synthesize actionLabel;
@synthesize resourceLabel;


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    /*if (self) {
       
    }*/
    return self;
}

- (void) setAdd{
	projectNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(75, 20, 220, 30) ];
	[projectNameLabel setTextColor:[UIColor whiteColor]];
	[projectNameLabel setBackgroundColor:[UIColor clearColor]];
	projectIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 20, 32, 32)];
	projectIcon.image = [UIImage imageNamed:@"addButton.png"];//[[UIImageView alloc] initWithImage:];	
	[self.contentView addSubview:projectIcon ];
	[self.contentView addSubview:projectNameLabel];
}

- (void) setProject{
	// Initialization code.
	projectIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 10, 64, 64)];
	projectIcon.image = [UIImage imageNamed:@"projectIcon.png"];//[[UIImageView alloc] initWithImage:];
	
	
	riskIcon = [[UIImageView alloc] initWithFrame:CGRectMake(66, 45, 32, 32)];
	riskIcon.image = [UIImage imageNamed:@"risksShadow.png"];//[[UIImageView alloc] initWithImage:];	
	
	problemIcon = [[UIImageView alloc] initWithFrame:CGRectMake(133, 45, 32, 32)];
	problemIcon.image = [UIImage imageNamed:@"problemsShadow.png"];//[[UIImageView alloc] initWithImage:];			
	
	actionIcon = [[UIImageView alloc] initWithFrame:CGRectMake(198, 45, 32, 32)];
	actionIcon.image = [UIImage imageNamed:@"actionShadow.png"];//[[UIImageView alloc] initWithImage:];	
	
	resourceIcon = [[UIImageView alloc] initWithFrame:CGRectMake(260, 45, 32, 32)];
	resourceIcon.image = [UIImage imageNamed:@"resourcesShadow.png"];//[[UIImageView alloc] initWithImage:];
	
	
	
	risksLabel = [[UILabel alloc] initWithFrame:CGRectMake(98, 50, 30, 30) ];
	risksLabel.font = [UIFont boldSystemFontOfSize: 9.0];
	risksLabel.textColor = [UIColor whiteColor];
	risksLabel.numberOfLines = 2;
	risksLabel.text = @"O: 999\nC: 999";
	risksLabel.backgroundColor = [UIColor clearColor];
	
	
	problemLabel = [[UILabel alloc] initWithFrame:CGRectMake(160, 50, 30, 30) ];
	problemLabel.font = [UIFont boldSystemFontOfSize: 9.0];
	problemLabel.textColor = [UIColor whiteColor];
	problemLabel.numberOfLines = 2;
	problemLabel.text = @"O: 999\nC: 999";
	problemLabel.backgroundColor = [UIColor clearColor];
	
	
	actionLabel = [[UILabel alloc] initWithFrame:CGRectMake(226, 50, 30, 30) ];
	actionLabel.numberOfLines = 2;
	actionLabel.font = [UIFont boldSystemFontOfSize: 9.0];
	actionLabel.textColor = [UIColor whiteColor];		
	actionLabel.text = @"O: 999\nC: 999";
	actionLabel.backgroundColor = [UIColor clearColor];
	
	
	resourceLabel = [[UILabel alloc] initWithFrame:CGRectMake(288, 50, 30, 30) ];
	resourceLabel.font = [UIFont boldSystemFontOfSize: 9.0];
	resourceLabel.textColor = [UIColor whiteColor];
	//resourceLabel.numberOfLines = 2;		
	resourceLabel.text = @"999";
	resourceLabel.backgroundColor = [UIColor clearColor];
	
	
	
	
	projectNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(75, 10, 220, 30) ];
	projectNameLabel.text = projectName;
	projectNameLabel.backgroundColor = [UIColor clearColor];
	
	[self.contentView addSubview:riskIcon ];
	[self.contentView addSubview:problemIcon ];
	[self.contentView addSubview:actionIcon ];		
	[self.contentView addSubview:resourceIcon ];		
	
	[self.contentView addSubview:risksLabel ];
	[self.contentView addSubview:problemLabel ];
	[self.contentView addSubview:actionLabel ];		
	[self.contentView addSubview:resourceLabel ];		
	
	[self.contentView addSubview:projectIcon ];
	[self.contentView addSubview:projectNameLabel];
}

- (void) setProjectName : (NSString *) name{
	projectName = name;
	projectNameLabel.text = projectName;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state.
}


- (void)dealloc {
    [super dealloc];
}


@end
